<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      /* vw vh 相对的是视口的大小 1vw = 1%视口大小*/
      width: 50vw;
      height: 100px;
      background-color: orange;
    }
  </style>
</head>

<body>
  <div class="box">我是box</div>
</body>

</html>